export function localTimeString(timestamp) {
    let date = new Date(timestamp)
    let year = date.getFullYear();
    let month = date.getMonth();
    let day = date.getDay();
    let hour = date.getHours();
    let minutes = date.getMinutes();
    let seconds = date.getSeconds();
    let ret = '' + year + '-' + (month < 10 ? '0' + month : month); 
    ret += '-' + (day < 10 ? '0' + day : day);
    ret += ' ' + (hour < 10 ? '0' + hour : hour);
    ret += ':' + (minutes < 10 ? '0' + minutes : minutes);
    ret += ':' + (seconds < 10 ? '0' + seconds : seconds);
    return ret;
}